1. Technical Field
The present disclosure relates to merging of XML documents and more specifically to merging of XML documents based on comparison of attributes associated with the elements of the XML documents.
2. Related Art
The widespread use of XML (Extensible Markup Language) technology for storing data in an enterprise and for exchanging data on the web necessitates efficient handling and manipulation of XML data. One well-known use of XML technology for information exchange exists in electronic business involving exchange of structured information such as bill of materials, purchase orders, invoices, etc between different business entities or organizations involved in business transactions, across the Internetwork. Often the information itself is stored as XML documents in the organization's information database. Whatever be the purpose of using XML technology, merging different XML documents often becomes necessary in order to consolidate data contained in the different XML documents into one single XML document for efficient use such as for transporting data across the network to another business entity. An example scenario with respect to the e-Business environment may involve merging of different XML documents containing information pertaining to bill of materials for a particular business transaction to generate a consolidated bill of materials for transporting to another business entity.
Merging two XML documents can be as simple as copying all the contents of both the XML documents into a single XML document. However, it may be desirable to merge the XML documents in a manner that accounts for the similarities and differences between the XML documents thereby generating a single merged XML document that does not include overlapping content and that adheres to the XML schema definitions (XSD) of the XML documents. A merging tool to generate such a merged output XML document from two or more input XML documents must be designed to resolve numerous conflicts in the input XML documents, such as duplicate elements in the input XML documents, duplicate elements but with revised content in one of the elements, conflicting elements at different positions in the input XML documents, different elements with matching element identifiers (ID-type attribute-xml:id/Version 1.0 W3C recommendation), etc. Merging without modifying the input XML documents, or without creating an XSLT (Extensible Stylesheet Language), and without much programming knowledge required of the user are additional desirable factors of a merging tool.
In addition to the specific e-Business environment described above, XML technology may be used for transporting data between any two computing systems thereby requiring consolidation of data from multiple XML documents into a single document for transport. In general, as well there is a need to consolidate data contained in several different XML documents for efficient storage in a database system. Given the widespread and popular use of XML technology for information storage and exchange, there is a general need for a robust merging technique that would automatically merge data contained in two or more XML documents into one single merged XML document.
In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.